object c2 {
	def main(): Unit = { {
		println(new case2().fibo(1));
		println(new case2().fibo(2));
		println(new case2().fibo(3));
		println(new case2().fibo(4));
		println(new case2().fibo(5));
		println(new case2().fibo(6));
		println(new case2().fibo(7));
		println(new case2().fibo(8));
		println(new case2().fibo(9));
	} }
}

class case2 {
	var f0: Int;
	var f1: Int;
	var f2: Int;

        def fibo(n: Int): Int = {
		f0 = 0;
		f1 = 1;
		f2 = 99;

		while(! (n < 0)) {
			f2 = f1 + f0;
			f0 = f1;
			f1 = f2;
			n = n-1;
		}

		return f0;
        }
}
